﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.ServiceModel;

using Infrastructure.Core.Common;
using SMG.Application.DTO.Program;

namespace SMG.ServiceContract.Program
{
    /// <summary>
    /// 节目单服务接口
    /// </summary>
    [ServiceContract]
    public interface IProgramBillService
    {
        /// <summary>
        /// 插入一条节目单信息
        /// </summary>
        /// <param name="billDto"></param>
        /// <returns></returns>
        [OperationContract]
        Boolean InsertProgramBill(ProgramBillDto billDto);
        
        /// <summary>
        /// 批量插入节目单列表信息
        /// </summary>
        /// <param name="billDtos"></param>
        /// <returns></returns>
        [OperationContract]
        Boolean InsertBatchProgramBill(List<ProgramBillDto> billDtos);

        /// <summary>
        /// 批量插入节目单列表信息
        /// </summary>
        /// <param name="billDtos"></param>
        /// <returns></returns>
        [OperationContract]
        Boolean InsertBatchProgramBill(BillVersionRecordDto billVersionDto, List<ProgramBillDto> billDtos);

        #region Query

        /// <summary>
        /// 查询节目单版本列表
        /// </summary>
        /// <param name="channelId"></param>
        /// <param name="playDate"></param>
        /// <returns></returns>
        [OperationContract]
        IEnumerable<BillVersionRecordDto> QueryBillVersion(String channelId, String playDate);

        /// <summary>
        /// 获取某个版本下的节目列表
        /// </summary>
        /// <param name="versionId"></param>
        /// <returns></returns>
        [OperationContract]
        IEnumerable<ProgramBillDto> QueryBillByVersion(long versionId);

        /// <summary>
        /// 分页获取某个版本下的节目列表
        /// </summary>
        /// <param name="versionId"></param>
        /// <returns></returns>
        [OperationContract]
        PageResult<ProgramBillDto> QueryBillByVersion(long versionId, Int32 pageIndex, Int32 pageSize);

        /// <summary>
        /// 分页查询节目单列表
        /// </summary>
        /// <param name="channelId"></param>
        /// <param name="playDate"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        PageResult<ProgramBillDto> QueryBillByPage(String channelId, String playDate, Int32 pageIndex, Int32 pageSize);

        #endregion

    }
}
